Conversation
…remember The memory compression path summarises conversation events and can therefore drop exact user text — names, numbers, sentences the user flagged with an explicit "remember this" imperative were getting paraphrased or summarised into generic bullets in `## Key Decisions`, then losing specificity further on each update cycle. Result: durable memory was missing content the user explicitly asked to preserve. This is handled entirely in prompts — no language-specific keyword table, no regex gate. The compressor LLM already reads the user's messages; we just tell it to recognise the INTENT (cross-language: 记住/记得/记下/牢记, remember/keep in mind/note this, 覚えて, 기억해줘, recuerda, запомни, etc.) and route that content into a dedicated section. - `summary-compressor.ts buildCompressionPrompt`: new `## User-Pinned Notes` section in the structured template. Both the fresh-compression branch and the update-existing-summary branch carry an explicit VERBATIM PRESERVATION RULE telling the LLM: copy pinned content word-for-word, never paraphrase, translate, or truncate; carry it forward unchanged across every update. - `materialization-coordinator.ts extractDurableSignalsFromSummary`: refactored to use a shared `extractSummarySection` helper (escaped-title regex) so any section can be pulled out. Now also scans `## User-Pinned Notes` and pushes each non-empty line into the `preferences` bucket of DurableSignals. Effect: pinned content is automatically promoted to `durable_memory_candidate` instead of living only in the short-lived recent_summary, where it could eventually age out on rotation. Existing summary-compressor + materialization tests remain green (25/25). The compressor tests don't assert on prompt text, so the change ships without touching test expectations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…remember
The memory compression path summarises conversation events and can therefore drop exact user text — names, numbers, sentences the user flagged with an explicit "remember this" imperative were getting paraphrased or summarised into generic bullets in
## Key Decisions, then losing specificity further on each update cycle. Result: durable memory was missing content the user explicitly asked to preserve.This is handled entirely in prompts — no language-specific keyword table, no regex gate. The compressor LLM already reads the user's messages; we just tell it to recognise the INTENT (cross-language: 记住/记得/记下/牢记, remember/keep in mind/note this, 覚えて, 기억해줘, recuerda, запомни, etc.) and route that content into a dedicated section.
summary-compressor.ts buildCompressionPrompt: new## User-Pinned Notessection in the structured template. Both the fresh-compression branch and the update-existing-summary branch carry an explicit VERBATIM PRESERVATION RULE telling the LLM: copy pinned content word-for-word, never paraphrase, translate, or truncate; carry it forward unchanged across every update.materialization-coordinator.ts extractDurableSignalsFromSummary: refactored to use a sharedextractSummarySectionhelper (escaped-title regex) so any section can be pulled out. Now also scans## User-Pinned Notesand pushes each non-empty line into thepreferencesbucket of DurableSignals. Effect: pinned content is automatically promoted todurable_memory_candidateinstead of living only in the short-lived recent_summary, where it could eventually age out on rotation.Existing summary-compressor + materialization tests remain green (25/25). The compressor tests don't assert on prompt text, so the change ships without touching test expectations.